Post

Replies

Boosts

Views

Activity

Reply to Invalid code signing entitlements with app group on macOS
@DTS Engineer Thank you for the detailed instructions. I followed each step carefully and achieved the "same" results as outlined in your guide (with different identifiers, of course). Specifically, I generated a new provision profile UUID and group identifiers starting with “group.” And in the provision profile file with the new UUID, there is key "com.apple.security.application-groups" with same value as set in Xcode. However, after uploading the archive to the App Store via Xcode Organizer, I am still encountering the same error as before. ... This value should be a string or an array of strings, where each string is the “group” value or your Team ID, followed by a dot (“.”), followed by the group name. If you're using the “group” prefix, verify that the provisioning profile used to sign the app contains the com.apple.security.application-groups entitlement and its associated value(s). ... Additionally, when testing the widget using WidgetKit Simulator on macOS, I receive error message continually when show the timeline. The operation couldn't be completed. (CHSErrorDomain error 1103.) Could you kindly advise on a solution for this as well?
Topic: Code Signing SubTopic: Entitlements Tags:
Feb ’25
Reply to CKSyncEngine & SwiftData
The ModelConfiguration is what you are looking for. I do not get chance to try it, but the WWDC video shows the way like: let people = ModelConfiguration(..., cloudKitContainerIdentifier: "com.xxx.xxx") let container = try ModelContainer(for: ..., people) I understand that SwiftData is a set of swift classes. However, I have some concerns about using them directly in the UI, as shown in the videos and the examples. This may lead to some problems: Performance issue. For instance, if a record contains some images, how can I handle them efficiently with SwiftData? I don't want to load all the image data in memory, but rather cache them in files and load the URL in the view model. Complicated logic. Using SwiftData models in the UI may be convenient for coding, but sometimes the logic may become too complex. We may need to create other view models based on the basic models. But SwiftData is not a lightweight variable, and I don't know how to track the changes of the SwiftData models in other custom @Observeable models. I have no more CoreData experience, would you please help to suggest the way to use SwiftData for my preceding concerns?
Jun ’23
Reply to CKSyncEngine & SwiftData
One of the benefits of SwiftData is that it allows us to access CloudKit containers directly without having to deal with CKRecord and other low-level details. However, I am wondering which solution is better for an app that has a complex view model. Is SwiftData suitable for handling complex data structures and relationships? Or should we use the the traditional way to code the view models with CKSyncEngine for sync?
Jun ’23
Reply to SwiftUI First Responder - TextField
We have a new open source SwiftUI package for the needs, at https://github.com/mobilinked/MbSwiftUIFirstResponder The SwiftUI style APIs TextField("Name", text: $name) .firstResponder(id: FirstResponders.name, firstResponder: $firstResponder, resignableUserOperations: .all) TextEditor(text: $notes) .firstResponder(id: FirstResponders.notes, firstResponder: $firstResponder, resignableUserOperations: .all) 2. Option for "tap to resign" for iOS 3. Option for "click to resign", "return key, esc key, ... to resign" for macOS It almost meets all the needs in the replies.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Dec ’20
Reply to AttributeGraph precondition failure with contextMenu
Similar problem here: Using @SceneStorage to storage filtering state, sometimes the app crashed when changing the SceneStorage value. @SceneStorage("filtering-string", defaultValue: "") var filteringString: String This variable is used in two views, one for input and one to use it to show a list. Error message: AttributeGraph precondition failure: setting value during update
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Sep ’20